Game Genie Code Converter
Version 4.0


Overview
--------
The Game Genie Code Converter quickly changes Game Genie codes into raw hex codes, and hex codes into GG codes. It does not generate cheat codes on its own, but rather is a tool to use when working on codes or when distributing codes in a different format than the one in which they are written. It can also be used to study the way minor variations in a GG code work or to make small changes in existing codes.

The main window displays buttons for each of the three systems supported by the Code Converter, as well as a quit button. Press the button for a system to display its converter.

As of this version, ConverterCore.DLL must be in the same directory as the program.

NES
---
The NES converter contains an entry box for GG codes, three for hex codes, a list of 6502 instructions, and an entry box for instruction ID numbers.

To convert a GG code into hex, just type it into the first box. The code is automatically converted when it contains either 6 or 8 letters. The instruction list and box also change automatically to reflect the contents of the code.

To convert a hex code into GG format, type the data into the three hex boxes. If your code only contains 6 characters (AAAA:DD), enter the first 4 into the first box and the last 2 into the last box. If the code contains 8 characters (AAAA?CC:DD), simply enter them all in order. When the code is entered correctly, the result will be displayed automatically, and the instruction area will switch to the new values.

To look up an instruction by number, simply type its number into the edit box next to the instruction list. To look up an instruction by name, scroll through the list until the desired name appears, then select it by clicking on it. Clicking on the list and then typing the name of the instruction will scroll to the closest match in the list.


SNES
----
The SNES window works in the same way as the NES window. To convert a code, simply type it into the appropriate boxes. When it is complete, the result will be displayed automatically. The 65c816 instruction list works in the same way as the 6502 list as well.

Under the hex code boxes are two buttons: Show 32K and Show 64K. These buttons adjust the current hex code and display the result in the message window (described below). Entering a HiROM code and pressing Show 32K does not actually produce a LoROM equivalent of the code. Similarly, entering a LoROM code and pressing Show 64K does not make a HiROM code. The feature is designed to make it easier to find the location of a HiROM code when the offsets in the file are printed in terms of a LoROM game, and to get HiROM codes from such offsets--the game itself must be a HiROM game for this to work.

To the right of the conversion boxes is a message window that comments on the current code and that displays the result of page adjustments. This window displays one of several things:
--No messages: Everything is normal.
--Critical, Address is not in ROM range: The address of the current hex code is not located in the SNES CPU's ROM area. The displayed GG code will not work on a Game Genie.
--Minor, Address is HiROM only: The address of the current hex code is located in an area only occupied by Mode 21 games. The displayed GG code will not work on a Mode 20 (LoROM) game. If the code is for a known HiROM game, ignore this message.
--Error in hex code: The page length of the current hex code cannot be adjusted because it is invalid.
--Hex code must be complete: The page length of the current hex code cannot be adjusted because it is missing or incomplete.
--Code is already in 32K range: The page length of the current hex code cannot be lowered because it is already at the smaller size.


Genesis
-------
The Genesis section simply contains entry areas for GG and hex codes. Converting codes is done in the same way as for NES and SNES codes.


Game Boy/Game Gear
------------------
The same section is used for both Game Boy and Game Gear codes. The formula is the same for both systems, but the valid address range is different. Select the appropriate radio button before converting your code, or you may get incorrect results.

The process of converting codes is similar to the other systems. To convert a GG code, enter either 6 or 9 digits into the top set of boxes. Hex codes are converted in the same way as NES codes: if you have only 6 digits, use the first and third boxes, and clear the second box. If you have 8, enter them all in order.

There is a 9th digit in the hex code, displayed off to the side. It doesn't appear to do anything. All of the official codes use an 8 for this digit. The 8 is filled in already, so there is no need to change it unless you are curious.

Below the code area is a place to look up Z80 instructions by name or number. This feature is a bit different than those in the NES and SNES sections. Z80 instructions are 2, 4, or 6 digits long. Since Game Genie codes only insert 2 digits of data, there is not enough information to determine the entire instruction from the GG code in most cases.

Select the name of the instruction from the list in the same way as usual. To look up an instruction by number, type the entire number into the text box. Keep in mind that the parameters of instructions beginning with DDCB and FDCB are in the middle of the number. "DDCB 04 4F" is actually instruction DDCB4F.